package cn.com.anypay.manager.dto;

import java.math.BigDecimal;
import java.util.List;

/**
 * 二维码入口参数，用于聚合静态码扫码后，后端返回给前端的参数
 */
public class QrcodeParams {

    /**
     * 拉起的页面类型
     * 例如: WECHAT_H5, ALIPAY_H5, WECHAT_MINI_PROGRAM, ALIPAY_MINI_PROGRAM, NORMAL_BROWSER_H5
     */
    private String pageType;

    /**
     * 关联的商户ID
     */
    private String merchantId;

    /**
     * 关联的商户名称
     */
    private String merchantName;

    /**
     * 支持的支付方式列表
     * 例如: WECHAT_PAY, ALIPAY
     */
    private List<String> paymentMethods;

    /**
     * 微信公众号AppID (用于JSAPI支付或小程序支付)
     */
    private String wechatAppId;

    /**
     * 微信小程序原始ID (用于拉起小程序)
     */
    private String wechatMiniProgramOriginalId;

    /**
     * 支付宝AppID (用于H5支付或小程序支付)
     */
    private String alipayAppId;

    /**
     * 支付宝小程序ID (用于拉起小程序)
     */
    private String alipayMiniProgramId;

    /**
     * 是否为普通商户模式 (true为普通商户，false为服务商模式下的特约商户)
     */
    private boolean isNormalMerchantMode;

    /**
     * 支付渠道标识
     * 例如: LESHUA, WECHAT_DIRECT, ALIPAY_DIRECT
     */
    private String paymentChannel;

    /**
     * 渠道商户号 (在支付渠道侧的商户号)
     */
    private String channelMerchantId;

    /**
     * 订单金额 (可选，如果二维码本身带有固定金额)
     */
    private BigDecimal orderAmount;

    /**
     * 商品描述
     */
    private String productDescription;

    /**
     * 附加数据 (支付时透传)
     */
    private String attach;

    /**
     * 支付成功异步通知地址
     */
    private String notifyUrl;

    /**
     * 支付成功后同步跳转地址 (可选)
     */
    private String redirectUrl;

    /**
     * 服务商模式下，特约商户的sub_appid (微信支付需要)
     */
    private String subAppId;

    /**
     * 服务商模式下，特约商户的sub_mch_id (微信支付、支付宝支付可能需要)
     */
    private String subMchId;

    // Getters and Setters

    public String getPageType() {
        return pageType;
    }

    public void setPageType(String pageType) {
        this.pageType = pageType;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public List<String> getPaymentMethods() {
        return paymentMethods;
    }

    public void setPaymentMethods(List<String> paymentMethods) {
        this.paymentMethods = paymentMethods;
    }

    public String getWechatAppId() {
        return wechatAppId;
    }

    public void setWechatAppId(String wechatAppId) {
        this.wechatAppId = wechatAppId;
    }

    public String getWechatMiniProgramOriginalId() {
        return wechatMiniProgramOriginalId;
    }

    public void setWechatMiniProgramOriginalId(String wechatMiniProgramOriginalId) {
        this.wechatMiniProgramOriginalId = wechatMiniProgramOriginalId;
    }

    public String getAlipayAppId() {
        return alipayAppId;
    }

    public void setAlipayAppId(String alipayAppId) {
        this.alipayAppId = alipayAppId;
    }

    public String getAlipayMiniProgramId() {
        return alipayMiniProgramId;
    }

    public void setAlipayMiniProgramId(String alipayMiniProgramId) {
        this.alipayMiniProgramId = alipayMiniProgramId;
    }

    public boolean isNormalMerchantMode() {
        return isNormalMerchantMode;
    }

    public void setNormalMerchantMode(boolean normalMerchantMode) {
        isNormalMerchantMode = normalMerchantMode;
    }

    public String getPaymentChannel() {
        return paymentChannel;
    }

    public void setPaymentChannel(String paymentChannel) {
        this.paymentChannel = paymentChannel;
    }

    public String getChannelMerchantId() {
        return channelMerchantId;
    }

    public void setChannelMerchantId(String channelMerchantId) {
        this.channelMerchantId = channelMerchantId;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    public String getSubAppId() {
        return subAppId;
    }

    public void setSubAppId(String subAppId) {
        this.subAppId = subAppId;
    }

    public String getSubMchId() {
        return subMchId;
    }

    public void setSubMchId(String subMchId) {
        this.subMchId = subMchId;
    }

    @Override
    public String toString() {
        return "QrcodeParams{" +
                "pageType='" + pageType + '\'' +
                ", merchantId='" + merchantId + '\'' +
                ", merchantName='" + merchantName + '\'' +
                ", paymentMethods=" + paymentMethods +
                ", wechatAppId='" + wechatAppId + '\'' +
                ", wechatMiniProgramOriginalId='" + wechatMiniProgramOriginalId + '\'' +
                ", alipayAppId='" + alipayAppId + '\'' +
                ", alipayMiniProgramId='" + alipayMiniProgramId + '\'' +
                ", isNormalMerchantMode=" + isNormalMerchantMode +
                ", paymentChannel='" + paymentChannel + '\'' +
                ", channelMerchantId='" + channelMerchantId + '\'' +
                ", orderAmount=" + orderAmount +
                ", productDescription='" + productDescription + '\'' +
                ", attach='" + attach + '\'' +
                ", notifyUrl='" + notifyUrl + '\'' +
                ", redirectUrl='" + redirectUrl + '\'' +
                ", subAppId='" + subAppId + '\'' +
                ", subMchId='" + subMchId + '\'' +
                '}';
    }
}